<%@page import="javax.print.attribute.standard.MediaSize.NA"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
    String role = (String) session.getAttribute("role");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Hibari Admin Login</title>
<link type="text/css" rel="stylesheet" href="styles.css">
</head>
<body>
	<%
	    if (role == null) {
	%>
	<form method="post" action="/log-in">
		<table>
			<tr>
				<th>ID</th>
				<td><input name="id" type="text" />
				</td>
			</tr>
			<tr>
				<th>PW</th>
				<td><input name="password" type="password" />
				</td>
			</tr>
			<caption>
				<%
				    String logInErrorMessage = (String) session.getAttribute("log-in-error-message");
				        if (logInErrorMessage != null) {
				            out.write(logInErrorMessage);
				        }
				%>
			</caption>
		</table>

		<input type="submit" />
	</form>
	<%
	    } else {
	%>
	Hello!
	<%
	    }
	%>
</body>
</html>